﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.IO;
using System.Configuration;

using ECCIT;
using ECCIT.Extension.Weibo_v2.Model;
using ECCIT.Extension.Weibo_v2.Common;

using OgilvyOne.UKNow.Model;
using OgilvyOne.UKNow.BLL;
using OgilvyOne.UKNow.Configuration;
using OgilvyOne.UKNow.Mobile.Utilities;

namespace OgilvyOne.UKNow.Mobile.APIs.User
{
    public class GetCount : IHttpHandler
    {
        public bool IsReusable { get { return true; } }

        public void ProcessRequest(HttpContext context)
        {
            try
            {
                string uid = context.Request.Params["uid"];
                int memberid = 0;
                if(int.TryParse(uid,out memberid ))
                {
                   MemberExt model= new MemberBLL(2052).GetUserEventCount(memberid, 2052);
                   string s = JsonSerializationHelper.ObjectToJson(model);
                   context.Response.Write(ResultUtility.ReturnResultJson("0", s, "获取用户的赞数、评论数、行程数、照片数成功"));

                }

            }
            catch (Exception)
            {
                context.Response.Write(ResultUtility.ReturnResultJson("-500", "", "获取失败"));
            }
        }
    }
}
